package com.svs.generator.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.svs.common.base.BaseEntity;
import com.svs.common.utils.StringUtils;

/**
 * 业务字段表 biz_column
 * 
 * @author 杜建桥
 * @date 2019-01-31
 */
public class BizColumn extends BaseEntity<BizColumn> {
	private static final long serialVersionUID = 1L;

	/** 主键 */
	private Long id;
	/** 所属表 */
	private String tableName;
	/** 数据库字段名称 */
	private String name;
	/** 数据库字段备注 */
	private String comments;
	/** 数据库字段类型 */
	private String jdbcType;
	/** 字段长度 */
	private Integer jdbcLength;
	/** 实体属性名称 */
	private String javaField;

	/** 构造实体属性名称 */
	private String structureField;

	/** 实体属性类型 */
	private String javaType;
	/** 是否主键 */
	private String isPk = "";
	/** 是否可为空 */
	private String isNull = "";
	/** 是否插入字段 */
	private String isInsert = "";
	/** 是否导入字段 */
	private String isImport = "";
	/** 是否编辑字段 */
	private String isEdit = "";
	/** 是否列表展示 */
	private String isList = "";
	/** 是否查询字段 */
	private String isQuery = "";
	/** 是否隐藏字段 */
	private String isHidden = "";
	/** 输入规则 ，手机号码，邮箱，数字，字符串，汉字 等等 */
	private String validator = "";
	/** 字段输入类型 */
	private String input;
	/** 排序 */
	private Integer sort;

	public String getStructureField() {
		structureField = StringUtils.convertToCamelCase(javaField);
		return structureField;
	}

	public void setStructureField(String structureField) {
		this.structureField = structureField;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getId() {
		return id;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	public String getTableName() {
		return tableName;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}

	public String getComments() {
		return comments;
	}

	public void setJdbcType(String jdbcType) {
		this.jdbcType = jdbcType;
	}

	public String getJdbcType() {
		return jdbcType;
	}

	public void setJdbcLength(Integer jdbcLength) {
		this.jdbcLength = jdbcLength;
	}

	public Integer getJdbcLength() {
		return jdbcLength;
	}

	public void setJavaField(String javaField) {
		this.javaField = javaField;
	}

	public String getJavaField() {
		return javaField;
	}

	public void setJavaType(String javaType) {
		this.javaType = javaType;
	}

	public String getJavaType() {
		return javaType;
	}

	public void setIsPk(String isPk) {
		this.isPk = isPk;
	}

	public String getIsPk() {
		return isPk;
	}

	public void setIsNull(String isNull) {
		this.isNull = isNull;
	}

	public String getIsNull() {
		return isNull;
	}

	public void setIsInsert(String isInsert) {
		this.isInsert = isInsert;
	}

	public String getIsInsert() {
		return isInsert;
	}

	public String getIsImport() {
		return isImport;
	}

	public void setIsImport(String isImport) {
		this.isImport = isImport;
	}

	public void setIsEdit(String isEdit) {
		this.isEdit = isEdit;
	}

	public String getIsEdit() {
		return isEdit;
	}

	public void setIsList(String isList) {
		this.isList = isList;
	}

	public String getIsList() {
		return isList;
	}

	public void setIsQuery(String isQuery) {
		this.isQuery = isQuery;
	}

	public String getIsQuery() {
		return isQuery;
	}

	public void setIsHidden(String isHidden) {
		this.isHidden = isHidden;
	}

	public String getIsHidden() {
		return isHidden;
	}

	public String getValidator() {
		return validator;
	}

	public void setValidator(String validator) {
		this.validator = validator;
	}

	public String getInput() {
		return input;
	}

	public void setInput(String input) {
		this.input = input;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	public Integer getSort() {
		return sort;
	}

	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId())
				.append("tableName", getTableName()).append("name", getName()).append("comments", getComments())
				.append("jdbcType", getJdbcType()).append("jdbcLength", getJdbcLength())
				.append("javaField", getJavaField()).append("javaType", getJavaType()).append("isPk", getIsPk())
				.append("isNull", getIsNull()).append("isInsert", getIsInsert()).append("isEdit", getIsEdit())
				.append("isList", getIsList()).append("isQuery", getIsQuery()).append("isHidden", getIsHidden())
				.append("sort", getSort()).toString();
	}
}
